cmake_minimum_required(VERSION 3.10)
project(ipc)
set(CMAKE_CXX_COMPILER /home/changhaitao/rv1126/buildroot/output/alientek_rv1126/host/bin/arm-linux-gnueabihf-g++)
set(CMAKE_C_COMPILER /home/changhaitao/rv1126/buildroot/output/alientek_rv1126/host/bin/arm-linux-gnueabihf-gcc)
set(dir /home/changhaitao/ipcamera/lib)
set(OpenCV_DIR /home/changhaitao/opencv/build-g++8.3.0/install/lib)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g")
add_executable(ipc main.cpp model.cpp process.cpp readfile.cpp rkmedia.cpp)
target_link_libraries(ipc
        ${OpenCV_DIR}/libopencv_core.so.407
        ${OpenCV_DIR}/libopencv_imgproc.so.407
        ${dir}/libeasymedia.so.1.0.1 
        ${dir}/librknn_api.so 
        -Wl,-rpath,/home/changhaitao/rv1126/buildroot/output/alientek_rv1126/host/arm-buildroot-linux-gnueabihf/sysroot/usr/lib
        ${dir}/librtsp.a
)
install(TARGETS ipc DESTINATION /home/changhaitao/ipcamera/bin)